package com.sunday.common.core.lambda.toolkit.support;

import com.sunday.common.core.utils.ReflectToJsonUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 字段注解映射实现类
 *
 * @author zsy
 * @since 2024/1/16
 */
@Getter
@AllArgsConstructor
public class DefaultColumnMapper implements ColumnMapper, Serializable {

    private String column;

    private String columnSelect;

    public static DefaultColumnMapper of(String column, String columnSelect) {
        return new DefaultColumnMapper(column, columnSelect);
    }

    @Override
    public String toString() {
        return ReflectToJsonUtils.toJson(this, true);
    }

}
